<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    /**
     * @param {number[]} nums
     * @return {boolean}
     */
    var containsDuplicate = function(nums) {
      const setNums = new Set(nums);
      let falg = false;
      if (Array.from(setNums).length < nums.length) falg = true;
      return falg;
    };
    console.log(containsDuplicate([1, 1, 1, 3, 3, 4, 3, 2, 4, 2]));
  </script>
</html>
